package user

import (
	"database/sql"
	"time"
)

type GfyxUserLoginPo struct {
	ID           int64        `gorm:"primaryKey" json:"id"`
	UserID       int64        `gorm:"user_id" json:"user_id"`
	Device       string       `gorm:"device" json:"device"`
	Way          int          `gorm:"way" json:"way"`
	Token        string       `gorm:"token" json:"token"`
	RefreshToken string       `gorm:"refresh_token" json:"refresh_token"`
	IsOnline     int          `gorm:"is_online" json:"is_online"`
	ClientIP     string       `gorm:"client_ip" json:"client_ip"`
	LoginTime    time.Time    `gorm:"login_time" json:"login_time"`
	ExpiredTime  time.Time    `gorm:"expired_time" json:"expired_time"`
	LogoutTime   sql.NullTime `gorm:"default:null" json:"logout_time"`
	CreatedBy    string       `gorm:"created_by" json:"created_by"`
	CreatedOn    time.Time    `gorm:"created_on" json:"created_on"`
	ModifiedBy   string       `gorm:"modified_by" json:"modified_by"`
	ModifiedOn   time.Time    `gorm:"modified_on" json:"modified_on"`
	IsDeleted    int          `gorm:"is_deleted" json:"is_deleted"`
}

func (GfyxUserLoginPo) TableName() string {
	return "gfyx_user_login"
}
